package com.slz3.business.module.messageManagement.mesCreate.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.messageManagement.mesCreate.domain.MesCreate;
import com.slz3.business.module.messageManagement.mesCreate.domain.MesCreateCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MesCreateResAtomic extends MesCreateResExecutor {

    public Mono<ServerResponse> add_$MesCreateUpdateLock(ServerRequest req, MesCreate mesCreate) {
        return MesCreateResSafeValid.add(req, mesCreate) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.add(req, mesCreate);
    }

    public Mono<ServerResponse> delete_$MesCreateUpdateLock(ServerRequest req, MesCreateCondition mesCreateCondition) {
        return MesCreateResSafeValid.delete(req, mesCreateCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.delete(req);
    }

    public Mono<ServerResponse> modify_$MesCreateUpdateLock(ServerRequest req, MesCreate mesCreate) {
        return MesCreateResSafeValid.modify(req, mesCreate) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.modify(req, mesCreate);
    }

    public Mono<ServerResponse> info_$MesCreateUpdateLock(ServerRequest req) {
        return MesCreateResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$MesCreateUpdateLock(ServerRequest req, MesCreateCondition mesCreateCondition) {
        return MesCreateResSafeValid.auditSubmit(req, mesCreateCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$MesCreateUpdateLock(ServerRequest req, MesCreateCondition mesCreateCondition) {
        return MesCreateResSafeValid.audit(req, mesCreateCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.audit(req);
    }

    public Mono<ServerResponse> auditReject_$MesCreateUpdateLock(ServerRequest req, MesCreateCondition mesCreateCondition) {
        return MesCreateResSafeValid.auditReject(req, mesCreateCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$MesCreateUpdateLock(ServerRequest req, MesCreateCondition mesCreateCondition) {
        return MesCreateResSafeValid.usingEnable(req, mesCreateCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$MesCreateUpdateLock(ServerRequest req, MesCreateCondition mesCreateCondition) {
        return MesCreateResSafeValid.usingDisable(req, mesCreateCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                super.usingDisable(req);
    }
}
